home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audio / alNewConfig.z / alNewConfig
Encoding:
Text File  |  1998-10-20  |  4.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg((((3333ddddmmmm))))                                              aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      alNewConfig - create and initialize an audio AAAALLLLccccoooonnnnffffiiiigggg structure
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiioooo....hhhh>>>>
  13.  
  14.      AAAALLLLccccoooonnnnffffiiiigggg aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg((((vvvvooooiiiidddd))))
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg creates and initializes an AAAALLLLccccoooonnnnffffiiiigggg structure.  An AAAALLLLccccoooonnnnffffiiiigggg
  18.      structure specifies the audio data format and queue size to be used by an
  19.      audio port.  The functions aaaallllOOOOppppeeeennnnPPPPoooorrrrtttt((((3333ddddmmmm)))) or aaaallllSSSSeeeettttCCCCoooonnnnffffiiiigggg((((3333ddddmmmm)))) apply the
  20.      properties specified in the AAAALLLLccccoooonnnnffffiiiigggg to a new or existing audio port,
  21.      respectively.
  22.  
  23.      To change the properties given in an AAAALLLLccccoooonnnnffffiiiigggg structure, see the commands
  24.      mentioned below in SEE ALSO.
  25.  
  26.      The default AAAALLLLccccoooonnnnffffiiiigggg specifies a 50,000 sample-frame stereo buffer,
  27.      utilizing a 16-bit two's complement sample format.
  28.  
  29.      When an AAAALLLLccccoooonnnnffffiiiigggg structure is no longer needed it should be discarded
  30.      with aaaallllFFFFrrrreeeeeeeeCCCCoooonnnnffffiiiigggg((((3333ddddmmmm)))).
  31.  
  32. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  33.      The following code fragment shows how to use an AAAALLLLccccoooonnnnffffiiiigggg to create an
  34.      audio port which provides floating-point data.
  35.  
  36.           ALconfig c;
  37.           ALport p;
  38.  
  39.           /* Create a config. This defaults to stereo, 16-bit integer data */
  40.           c = alNewConfig();
  41.           if (!c) {
  42.               printf("Couldn't create ALconfig:%s\n", alGetErrorString(oserror()));
  43.               exit(-1);
  44.           }
  45.  
  46.           /* Specify single-precision floating-point data instead */
  47.           alSetSampFmt(c, AL_SAMPFMT_FLOAT);
  48.  
  49.           /* Now attempt to open an audio input port using this config */
  50.           p = alOpenPort("ALconfig example", "r", c);
  51.  
  52.           if (!p) {
  53.               printf("Couldn't open an audio port:%s\n", alGetErrorString(oserror()));
  54.               exit(-1);
  55.           }
  56.  
  57.           /*
  58.            * We've now got an input port giving us floating-point data. If we
  59.            * no longer need the ALconfig, we should free it with alFreeConfig(c);
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg((((3333ddddmmmm))))                                              aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.            */
  75.  
  76.  
  77.  
  78. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  79.      Upon successful completion, aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg returns an opaque AAAALLLLccccoooonnnnffffiiiigggg
  80.      structure initialized to the default values.  If the structure allocation
  81.      fails, aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg returns 0 and sets an error number which can be
  82.      retrieved with oooosssseeeerrrrrrrroooorrrr((((3333CCCC)))).
  83.  
  84.      aaaallllNNNNeeeewwwwCCCCoooonnnnffffiiiigggg can fail for the following reason:
  85.  
  86.      AAAALLLL____BBBBAAAADDDD____OOOOUUUUTTTT____OOOOFFFF____MMMMEEEEMMMM   insufficient memory is available to allocate the
  87.                          AAAALLLLccccoooonnnnffffiiiigggg structure.
  88.  
  89. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  90.      alFreeConfig(3dm), ALqueuesize(3dm), alSetWidth(3dm), alSetChannels(3dm),
  91.      alOpenPort(3dm), alSetConfig(3dm), alGetConfig(3dm), oserror(3C)
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.